package org.jeecg.modules.charge.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.entity.basedata.BaseFloor;
import org.jeecg.entity.basedata.BaseRoom;
import org.jeecg.modules.charge.entity.PayAccountConfig;
import org.jeecg.modules.charge.vo.BaseProject;

/**
 * @Description: 支付分账配置表
 * @Author: jeecg-boot
 * @Date:   2021-02-28
 * @Version: V1.0
 */
public interface PayAccountConfigMapper extends BaseMapper<PayAccountConfig> {

    @Select("select * from base_project where name = #{projectName}")
    BaseProject getBaseProjectByName(@Param("projectName") String projectName);

    @Select("select * from base_floor where name = #{floorName} and project_id = #{projectId}")
    BaseFloor getBaseFloorByName(@Param("floorName") String floorName, @Param("projectId") String projectId);

    @Select("select * from base_room where name = #{roomName} and floor_id = #{floorId}")
    BaseRoom getBaseRoomByName(@Param("roomName") String roomName, @Param("floorId") String floorId);
}
